package com.situ.student.controller;

import java.util.List;

import com.situ.student.entity.Student;
import com.situ.student.service.IStudentService;
import com.situ.student.service.impl.StudentServiceImpl;

/**
 * 学生相关的Controller
 */
public class StudentController {
	private IStudentService studentService = new StudentServiceImpl();
	
	public List<Student> list() {//打印
		return studentService.list();
	}
	
	public boolean insert(String name,int age,String gender,String banji) {//插入
		Student student = new Student(name,age,gender,banji);
		return studentService.insert(student);
	}

	public boolean deleteById(Integer id) { //删除
		return studentService.deleteById(id);
	}
	
	public List<Student> findByName(String name) {
		return studentService.findByName(name);
	}
}
